package com.simple.datax.vo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * The Class TbResourcesVO.
 */
@Entity
@Table(name = "TB_RESOURCES")
public class TbResourcesVO  implements Serializable {

	private static final long serialVersionUID = 4487432750431791818L;

	/** The id. */
	@EmbeddedId
	private TbResourcesIdVO id;

	/** The value. */
	@Column(name = "VL")
	private String value;

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
        result = prime * result + ((null == id) ? 0 : id.hashCode());
		return result;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(final Object obj) {
        boolean result = true;
		if (this == obj) {
            result = true;
        } else {
            if (null == obj) {
                result = false;
            } else {
                if (getClass() == obj.getClass()) {
                    final TbResourcesVO other = (TbResourcesVO) obj;
                    if (null == id) {
                        if (null != other.id) {
                            result = false;
		}
                    } else if (!id.equals(other.id)) {
                        result = false;
		}
                } else {
                    result = false;
		}
			}
		}
        return result;
	}
/**
	 * Gets the id.
	 * 
	 * @return the id
	 */
	public TbResourcesIdVO getId() {
		return id;
	}

	/**
	 * Sets the id.
	 * 
	 * @param id
	 *            the new id
	 */
	public void setId(final TbResourcesIdVO id) {
		this.id = id;
	}

	/**
	 * Gets the value.
	 * 
	 * @return the value
	 */
	public String getValue() {
		return value;
	}

	/**
	 * Sets the value.
	 * 
	 * @param value
	 *            the new value
	 */
	public void setValue(final String value) {
		this.value = value;
	}

}